﻿#region Using Statements
using System;
using System.Diagnostics;
#endregion

namespace DirectZZT.Shared.Core
{
    /// <summary>
    /// Provides export-metadata, such as alias etc.
    /// </summary>
    [Serializable()]
    [DebuggerDisplay("Alias = {Alias}")]
    [AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = false)]
    public sealed class ExportAttribute : Attribute
    {
        #region Properties

        /// <summary>
        /// Gets the exported alias of this type.
        /// </summary>
        public string Alias { get; private set; }
        /// <summary>
        /// Gets/sets the interface type that this exports.
        /// </summary>
        public Type Type { get; set; }

        #endregion

        #region Constructors

        /// <summary>
        /// Initializes a new instance of the ExportAttribute class.
        /// </summary>
        /// <param name="alias">The exported alias of this type.</param>
        public ExportAttribute(string alias)
        {
            Alias = alias;
        }

        #endregion
    }
}
